# -*- coding: utf-8 -*-
"""
Created on Sun Sep 24 22:39:05 2017

@author: wqf
"""

import tkinter as tk

color = {" "   :  "#DCDCDC",
         "2"   :  "#FF9F00",
         "4"   :  "#AD9F2F",
         "8"   :  "#DAA520",
         "16"  :  "#D2691E",
         "32"  :  "#ADFF2F",
         "64"  :  "#008000",
         "128" :  "#FF4500",
         "256" :  "#00BFFF",
         "512" :  "#CD5C5C",
         "1024":  "#800080",
         "2048":  "#FFD700"}


if __name__ == "__main__":    
    root = tk.Tk()

    for num in color.keys():
        tk.Label(root,text=num,bg=color[num],width=5,height=3).pack(side=tk.LEFT)

    root.mainloop()
